<template>
    <el-upload
            action="http://api.blb.com/api/upload-api/upload"
            :show-file-list="false"
            :on-success="handleUploadSuccess">
        <button size="mini" type="primary" round>上传</button>
        <img v-for="img in images" :src="img" style="height: 40px;width: 40px">
    </el-upload>
</template>

<script>
    export default {
        name: "ImageUpload",
        props:{
            //图片数组
            images:{
                type:Array
            }
        },
        methods:{
            handleUploadSuccess(res){
                this.images.push(res.url);
            }
        }
    }
</script>

<style scoped>

</style>